package net.xi.dmhome.mapper;

import net.xi.dmhome.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jxhu
 * @since 2021-02-02
 */
@Repository
public interface CommentMapper extends BaseMapper<Comment> {

    @Select("select * from dm_comment where postid = #{postid} and isdel = 0")
    List<Comment> getByPostidAfter(@PathVariable("postid") Integer postid);


    @Select("select * from dm_comment where uuid = #{uuid} and isdel = 0")
    List<Comment> getByUserUuid(@PathVariable("uuid") String uuid);
}
